home *** CD-ROM | disk | FTP | other *** search
-
- /*© Copyright 1988-1993 UserLand Software, Inc. All Rights Reserved.*/
-
- #include "iacinternal.h"
-
-
- Boolean IACpushtextparam (Handle val, OSType keyword) {
-
- return (IACpushbinaryitem (IACglobals.event, val, typeChar, keyword));
- } /*IACpushtextparam*/
-
-
- Boolean IACreturntext (Handle x) {
-
- return (IACpushbinaryitem (IACglobals.reply, x, typeChar, keyDirectObject));
- } /*IACreturntext*/
-
-
- Boolean IACgettextparam (OSType keyword, Handle *htext) {
-
- if (!IACgettextitem (IACglobals.event, keyword, htext)) {
-
- IACparamerror (IACglobals.errorcode, "\ptext", keyword);
-
- return (false);
- }
-
- IACglobals.nextparamoptional = false; /*must be reset for each param*/
-
- return (true);
- } /*IACgettextparam*/
-
-
- Boolean IACgettextitem (AEDescList *list, long n, Handle *val) {
-
- register OSErr ec;
- AEDesc desc;
- DescType key;
- Size actualSize;
-
- if ((*list).descriptorType != typeAEList) {
-
- ec = AEGetKeyDesc (list, n, typeChar, &desc);
-
- if (ec != errAEDescNotFound)
- goto done;
- }
-
- ec = AEGetNthDesc (list, n, typeChar, &key, &desc);
-
- done:
-
- IACglobals.errorcode = ec;
-
- if (ec == noErr) {
-
- *val = desc.dataHandle;
-
- return (true);
- }
- else {
- *val = NULL;
-
- return (false);
- }
- } /*IACgettextitem*/
-
-
- Boolean IACpushtextitem (AEDescList *list, Handle val, long n) {
-
- return (IACpushbinaryitem (list, val, typeChar, n));
- } /*IACpushtextitem*/
-
-
-